﻿Imports System.Data
Imports Microsoft.Reporting.WebForms

Partial Class Form_frmChkCustomerReview
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            doLoadData()
        End If
    End Sub
    Public Sub doLoadData()
        Try
            If Not (Session("dtCustomerReview") Is Nothing) Then
                ReportViewer2.ProcessingMode = ProcessingMode.Local
                Dim dtData1 As New DataTable()
                dtData1 = DirectCast(Session("dtCustomerReview"), DataTable)
                ReportViewer2.LocalReport.ReportPath = Server.MapPath("../Form/reportKYC/rptCustomerReview.rdlc")
                Dim objData1 As New ReportDataSource("DataSet1", dtData1)
                ReportViewer2.LocalReport.DataSources.Clear()
                ReportViewer2.LocalReport.DataSources.Add(objData1)
                Dim NEXT_REVIEW_DATE As String = ""
                If Not (Request.Item("NEXT_REVIEW") = "") Then
                    NEXT_REVIEW_DATE = Request.Item("NEXT_REVIEW")
                End If


                Dim rpEmployeeSSN As New ReportParameter()
                rpEmployeeSSN.Name = "MonthYear"
                rpEmployeeSSN.Values.Add(NEXT_REVIEW_DATE)

                'Set the report parameters for the report
                Dim parameters() As ReportParameter = {rpEmployeeSSN}
                ReportViewer2.LocalReport.SetParameters(parameters)
                ReportViewer2.LocalReport.DisplayName = "ApproveLeaseReport"
                'ReportViewer2.DataBind()
                ReportViewer2.LocalReport.Refresh()
            End If
        Catch ex As Exception

        End Try

    End Sub

    

End Class
